package com.aaa.ssm.controller;

import com.aaa.ssm.entity.LoginLog;
import com.aaa.ssm.service.LoginLogService;
import com.aaa.ssm.util.Page;
import com.aaa.ssm.util.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("loginLog")
public class LoginLogController extends BaseController{
    @Resource
    private LoginLogService loginLogService;

    @PostMapping("queryPage")
    public Result queryPage(@RequestBody Page<LoginLog> page){
        return success(loginLogService.queryLoginLog(page));

    }
    @GetMapping("/{queryTime}")
    public Result queryPage(@PathVariable String queryTime){
        List<Map> list = loginLogService.queryAll(queryTime);
        return success(list);
    }
}
